{template 'common/header'}
<div class="main">
    <ul class="nav nav-tabs">
        <li><a href="{php echo $this->createWebUrl('formManage');}">商家管理</a></li>
        <li><a href="{php echo url('platform/reply/post',array('m'=>'mon_orderform'));}">添加商家</a></li>
        <li class="active"><a href="{php echo $this->createWebUrl('OrderItemEdit',array('fid'=>$fid));}">添加订单类型</a></li>
        <li><a href="{php echo $this->createWebUrl('OrderItemlist',array('fid'=>$fid));}">订单类型管理</a></li>

    </ul>

    <form method="post">
        <input type="hidden" name="fid" value="{$fid}">
        <input type="hidden" name="iid" value="{$iid}">
        <div class="panel panel-default">

            <div class="panel-heading">
                {$form['pname']} 订单类型添加

            </div>
            <div class="panel-body">


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">类型名称</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="iname"
                               value="{$item['iname']}">
                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">类型简要说明</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="i_summary"
                               value="{$item['i_summary']}">
                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">预定电话</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="o_tel"
                               value="{$item['o_tel']}">
                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">原价</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="y_price"
                               value="{$item['y_price']}">
                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">优惠价</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="x_price"
                               value="{$item['x_price']}">
                        <span class="help-block"></span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">库存数量</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="o_num"
                               value="{$item['o_num']}">
                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">支付方式</label>

                    <div class="col-sm-9 col-xs-12">

                        <input type="radio" name="pay_type" value="1" {if $item['pay_type'] == 1} checked="checked" {/if}>立即支付  &nbsp; <input type="radio" name="pay_type" value="2" {if $item['pay_type'] == 2}checked="checked" {/if} />现场支付


                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">头部图片</label>

                    <div class="col-sm-9 col-xs-12">

                        {php echo tpl_form_field_image('ititle_pg',$item['ititle_pg']);}
                        建议宽*高(670*390)
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">图片链接地址</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="ititle_url"
                               value="{$item['ititle_url']}">
                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">类型顶部图片下方标题</label>

                    <div class="col-sm-9 col-xs-12">
                        <input type="text" class="form-control ng-pristine ng-valid" placeholder="" name="ititle"
                               value="{$item['ititle']}">
                        <span class="help-block"></span>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span
                            style='color:red'>*</span>订单说明：</label>

                    <div class="col-sm-9 col-xs-12">
                        <textarea style="height: 60px;" id="i_desc" name="i_desc" class="form-control span7" cols="60">{$item['i_desc']}</textarea>
                    </div>
                </div>


                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>

                    <div class="col-sm-9 col-xs-12">

                        <input name="submit" type="submit" value="保存"
                               class="btn btn-primary span3"> <input type="hidden"
                                                                     name="token" value="{$_W['token']}"/>

                    </div>
                </div>


            </div>

        </div>

    </form>

</div>
<script>

    require(['jquery', 'util'], function ($, u) {
        $(function () {
            u.editor($('#i_desc')[0]);
        });
    });


</script>

{template 'common/footer'}